package com.myschool.server.manager.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.myschool.server.dao.SchoolDao;
import com.myschool.server.dao.SubjectDao;
import com.myschool.server.dao.support.BaseEntityDaoHibernate;
import com.myschool.server.manager.BaseManager;
import com.myschool.server.manager.SubjectManager;
import com.myschool.server.model.School;
import com.myschool.server.model.Subject;

@Service
@Transactional
public class SubjectManagerImpl extends BaseManager<Subject> implements
		SubjectManager {

	@Autowired
	private SubjectDao dao;

	@Autowired
	private SchoolDao schoolDao;

	@Override
	protected BaseEntityDaoHibernate getDao() {
		return (BaseEntityDaoHibernate) this.dao;
	}

	public List<Subject> createSubjects(Long schoolId, List<Subject> subjects) {

		School school = this.schoolDao.get(schoolId);
		
		return null;
	}

	/**
	 * @return the schoolDao
	 */
	public SchoolDao getSchoolDao() {
		return schoolDao;
	}

	/**
	 * @param schoolDao the schoolDao to set
	 */
	public void setSchoolDao(SchoolDao schoolDao) {
		this.schoolDao = schoolDao;
	}

	/**
	 * @param dao the dao to set
	 */
	public void setDao(SubjectDao dao) {
		this.dao = dao;
	}
}
